package com.itedge.solutionmanager.taskdata.impl.solution;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Version;
import javax.validation.constraints.Size;
import com.itedge.solutionmanager.domain.impl.Customer;
import com.itedge.infrastructure.taskdata.impl.AbstractTaskDataEntity;

@Entity
@Table(name="REG_CUST_TASK_DATA")
public class RegisterCustomerTaskData extends AbstractTaskDataEntity {
	
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;	

	@Version
    @Column(name = "version")
    private Integer version;
	
	@Column(name ="CUSTOMER_DESC")
	@Size(max = 4000)
	private String customerDescription;
	
	@Column(name ="CONTACT_PERSON_NOTES")
	@Size(max = 4000)
	private String contactPersonNotes;
	
    @Size(max = 255)
    @Column(name="CUSTOMER_NAME")
    private String customerName;
    
    @Size(max = 255)
    @Column(name="CONTACT_FIRSTNAME")
    private String contactPersonFirstName;
    
    @Size(max = 255)
    @Column(name="CONTACT_SECOND_NAME")
    private String contactPersonSecondName;
    
    @Size(max = 255)
    @Column(name="CONTACT_TITLE")
    private String contactPersonTitle;
    
    @Size(max = 255)
    @Column(name="CONTACT_PHONE")
    private String contactPersonPhone;
	
    @Column(name="IS_EXISING")
    private Boolean isExistingCust;

	@OneToOne
    private Customer assignedCustomer;

    public String getContactPersonPhone() {
		return contactPersonPhone;
	}

	public void setContactPersonPhone(String contactPersonPhone) {
		this.contactPersonPhone = contactPersonPhone;
	}

	public Boolean getIsExistingCust() {
		return isExistingCust;
	}

	public void setIsExistingCust(Boolean isExistingCust) {
		this.isExistingCust = isExistingCust;
	}
	
	public Customer getAssignedCustomer() {
		return assignedCustomer;
	}

	public void setAssignedCustomer(Customer assignedCustomer) {
		this.assignedCustomer = assignedCustomer;
	}	
	
	public String getCustomerDescription() {
		return customerDescription;
	}

	public void setCustomerDescription(String customerDescription) {
		this.customerDescription = customerDescription;
	}

	public String getContactPersonNotes() {
		return contactPersonNotes;
	}

	public void setContactPersonNotes(String contactPersonNotes) {
		this.contactPersonNotes = contactPersonNotes;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getContactPersonFirstName() {
		return contactPersonFirstName;
	}

	public void setContactPersonFirstName(String contactPersonFirstName) {
		this.contactPersonFirstName = contactPersonFirstName;
	}

	public String getContactPersonSecondName() {
		return contactPersonSecondName;
	}

	public void setContactPersonSecondName(String contactPersonSecondName) {
		this.contactPersonSecondName = contactPersonSecondName;
	}

	public String getContactPersonTitle() {
		return contactPersonTitle;
	}

	public void setContactPersonTitle(String contactPersonTitle) {
		this.contactPersonTitle = contactPersonTitle;
	}

	@Override
	public Long getId() {
        return this.id;
    }

	public void setId(Long id) {
        this.id = id;
    }	

	@Override
	public Integer getVersion() {
        return this.version;
    }

	@Override
	public void setVersion(Integer version) {
        this.version = version;
    }
}